import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.Border;



public class PanelDerechoDefault extends JPanel{

	
	private static final long serialVersionUID 	= 4L;
	private ServidorBaseDatos baseDatos				;
				
	
	public PanelDerechoDefault(ServidorBaseDatos baseDatos){
	
		this.baseDatos=baseDatos;
		this.setLayout(new GridBagLayout());
		agregarBorde();
		
		agregarBusqueda();
		agregarListado();
		agregarIngresoDatos();
	}
	private void agregarBorde(){
		
		Border raisedbevel, loweredbevel;
		raisedbevel = BorderFactory.createRaisedBevelBorder();
		loweredbevel = BorderFactory.createLoweredBevelBorder();
		Border compound;
		compound = BorderFactory.createCompoundBorder(raisedbevel, loweredbevel);
		this.setBorder(compound);
	}
	
	private void agregarBusqueda(){
		
		GridBagConstraints constraints = new GridBagConstraints();
				
		constraints.gridx = 0;
		constraints.gridy = 0;
		constraints.gridwidth = 3;
		constraints.gridheight = 1;
		constraints.fill = GridBagConstraints.BOTH;
		constraints.weighty = 0.0; 
		constraints.weightx = 1.0;
		constraints.ipady = 10;
		this.add (new JButton("Busqueda"), constraints);	
	}
	private void agregarListado(){
		
		GridBagConstraints constraints = new GridBagConstraints();
		
		constraints.gridx = 0;
		constraints.gridy = 1;
		constraints.gridwidth = 3;
		constraints.gridheight = 1;
		constraints.fill = GridBagConstraints.BOTH;
		constraints.weighty = 1.0; 
		constraints.weightx = 1.0;
		this.add (new JButton("Listado"), constraints); 
		
	}
	private void agregarIngresoDatos(){
		
		GridBagConstraints constraints = new GridBagConstraints();
		
		constraints.gridx = 0;
		constraints.gridy = 2;
		constraints.gridwidth = 3;
		constraints.gridheight = 1;
		constraints.fill = GridBagConstraints.BOTH;
		constraints.weighty = 1.0; 
		constraints.weightx = 1.0;
		this.add (new JTextField("Ingreso Datos 2"), constraints); 
	}
}
